Use Database.EnsureCreatedAsync in boilerplate test project (#11524)#11527
Use Database.EnsureCreatedAsync in boilerplate test project (#11524)#11527msynk merged 1 commit intobitfoundation:developfrom yasmoradi:11524
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughThe test initializer database creation logic was simplified by replacing migration-based initialization with a single Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (1)
src/Templates/Boilerplate/Bit.Boilerplate/src/Tests/TestsInitializer.cs(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: CodeQL analysis (csharp)
- GitHub Check: build and test
There was a problem hiding this comment.
Pull Request Overview
This PR simplifies database initialization in tests by replacing Entity Framework Core migration logic with EnsureCreatedAsync(). The change removes the complexity of checking for pending/applied migrations and instead directly creates the database schema, though a comment notes that EF Core migrations are still recommended for production scenarios.
closes #11524
Summary by CodeRabbit
Note: This update contains no user-facing changes. It refactors internal testing mechanisms only.